﻿using System;
using Battle.Net;
using NUnit.Framework;

namespace Aesha.wow.Api.Tests
{
    [TestFixture]
    public class ExceptionTests
    {
        public BattleNetConnection Connection { get; set; }

        [TestFixtureSetUp]
        public void Setup()
        {
            Connection = new BattleNetConnection(Host.Europe, Locale.en_GB) {UseCache = false};
        }

        [Test]
        public void PageCantBeFoundException()
        {
            try
            {
                Connection.Items.GetItem(9999999);
            }
            catch (Exception ex)
            {
                Assert.IsTrue(ex.GetType() == typeof(BattleNetException));
            }
        }
    }
}
